#include<iostream>
#include<cstring>
#include<iomanip>
using namespace std;

class Person
{
    private:
        string name;
        double height,heavy,width;
    public:
        void SetInit(string _na,double _hei,double _hea,double _wid)
        {
            name=_na;
            height=_hei;
            heavy=_hea;
            width=_wid;
        }
        double GetBMI()
        {
            return heavy/(height*height);
        }
        double fat()
        {
            double a=width*0.74;
            double b=heavy*0.082+34.89;
            return (a-b)/heavy;
        }
        string GetName()
        {
            return name;
        }
};

int main()
{
    int num;
    cin>>num;
    Person* nums=new Person[num];
    for(int i=0;i<num;i++)
    {
        string _na;
        double _hei, _hea, _wid;
        cin>>_na>>_hei>>_hea>>_wid;
        nums[i].SetInit(_na,_hei,_hea,_wid);
    }
    for(int i=0;i<num;i++)
    {
        cout<<nums[i].GetName()<<"的BMI指数为";
        cout<<fixed<<setprecision(0)<<nums[i].GetBMI();
        cout<<"--体脂率为";
        cout<<fixed<<setprecision(2)<<nums[i].fat()<<endl;
    }
}